function AjaxInit()
{

	if (window.XMLHttpRequest)
	{
		var comp_req  = new XMLHttpRequest();
	}

	else if (window.ActiveXObject)
	{
		var comp_req = new ActiveXObject("Microsoft.XMLHTTP")
	}
	return comp_req;


}

function exec(dbtable,fields,filter,order)
{
	comp_req=AjaxInit();
	url='http://'+document.domain+'/corequery/';
	comp_req.onreadystatechange = function()
	{
		if (comp_req.readyState == 4)
		{
			if (comp_req.status == 200)
			{
				var msg=comp_req.responseText;
				var person = eval('('+comp_req.responseText+')');
				var rows=person.rows;
				alert(rows[1].c_name_eng)
				
			}

		}
	}


	comp_req.open("POST", url, true)
		comp_req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charsert=utf-8");
	comp_req.send('dbtable='+dbtable+'&fields='+fields+'&filter='+filter+'&order='+order);
}


